package demo1;

import java.util.Scanner;

/**
 * @Author liangzai
 * @Description:
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x1 = scanner.nextInt();
        int y1 = scanner.nextInt();
        int x2 = scanner.nextInt();
        int y2 = scanner.nextInt();
        int[][] dp = new int[x1 + 2][y1 + 2];
        int[][] cop = new int[x1 + 1][y1 + 1];
        for (int i = 0; i <= x1; i++) {
            for (int j = 0; j <= y1; j++) {
                if ((x2==i&&y2==j) || (x2 + 1 == i && (y2 + 2 == j || y2 - 2 == j)) || (x2 - 1 == i && (y2 + 2 == j || y2 - 2 == j)) ||
                        (x2 + 2 == i && (y2 + 1 == j || y2 - 1 == j)) || (x2 - 2 == i && (y2 + 1 == j || y2 - 1 == j))) {
                    cop[i][j] = 1;
                }
            }
        }
        if(cop[0][0]==1) {
            System.out.println(0);
        }
        dp[0][1] = 1;
        for (int i = 1; i <= x1+1; i++) {
            for (int j = 1; j <= y1+1; j++) {
                if(cop[i-1][j-1]!=1){
                    dp[i][j] = dp[i-1][j] + dp[i][j-1];
                }
            }
        }
        System.out.println(dp[x1+1][y1+1]);
    }
}
